<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateShareTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateShareLabel_budget}" for="budget" />
                    <h:inputText id="budget" value="#{shareController.selected.budget}" title="#{bundle.CreateShareTitle_budget}" />
                    <h:outputLabel value="#{bundle.CreateShareLabel_count}" for="count" />
                    <h:inputText id="count" value="#{shareController.selected.count}" title="#{bundle.CreateShareTitle_count}" />
                    <h:outputLabel value="#{bundle.CreateShareLabel_description}" for="description" />
                    <h:inputText id="description" value="#{shareController.selected.description}" title="#{bundle.CreateShareTitle_description}" />
                    <h:outputLabel value="#{bundle.CreateShareLabel_place}" for="place" />
                    <h:inputText id="place" value="#{shareController.selected.place}" title="#{bundle.CreateShareTitle_place}" />
                    <h:outputLabel value="#{bundle.CreateShareLabel_reward}" for="reward" />
                    <h:inputText id="reward" value="#{shareController.selected.reward}" title="#{bundle.CreateShareTitle_reward}" />
                    <h:outputLabel value="#{bundle.CreateShareLabel_startDate}" for="startDate" />
                    <h:inputText id="startDate" value="#{shareController.selected.startDate}" title="#{bundle.CreateShareTitle_startDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateShareLabel_name}" for="name" />
                    <h:inputText id="name" value="#{shareController.selected.name}" title="#{bundle.CreateShareTitle_name}" />
                    <h:outputLabel value="#{bundle.CreateShareLabel_id}" for="id" />
                    <h:inputText id="id" value="#{shareController.selected.id}" title="#{bundle.CreateShareTitle_id}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{shareController.create}" value="#{bundle.CreateShareSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{shareController.prepareList}" value="#{bundle.CreateShareShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateShareIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
